import request from '@/config/axios'
import { getRefreshToken } from '@/utils/auth'
import type { UserLoginVO } from './types'

export interface SmsCodeVO {
    mobile: string
    scene: number
}

export interface ResetPwdByMobile {
    mobile: string
    code: string
    password: string
}

export interface UserInfo {
    id: number
}

export interface ResetPwdById {
    newPassword: string,
    oldPassword: string,

}
// 重置密码，获取短信验证码
export const getResetPwdSmsCode = (data: SmsCodeVO) => {
    return request.post({ url: '/system/user/send-sms-code', data })
}

// 重置密码，手机号
export const resetPwdByMobile = (data: ResetPwdByMobile) => {
    return request.put({ url: '/system/user/moblie-update-password', data })
}

// 重置密码，帐号
export const resetPwdById = (data: ResetPwdById) => {
    return request.put({ url: '/system/user/profile/update-password', data })
}
// 判断是否需要重置密码
export const getUserPwdStatus = (params:UserInfo)=>{
    return request.get({ url: '/system/user/get', params })
}
// url
export const getResetPwdSmsCodeUrl='/system/user/send-sms-code'
